%mu=1 leap-frog
clear
diatah=17;
a=(15-diatah):0.05:(25+diatah);
u=f0(a);
u0=u;
n=(10+2*diatah)/0.05+1;

for i=1:1
    n=n-2;
    u_temp=zeros(1,n);
    for j=1:n
       u_temp(j)= (-0.4+0.32)*u(j+2)+(0.4+0.32)*u(j)+(1-0.64)*u(j+1);
    end
    u1=u_temp;
end

for i=2:20*17
    n=n-2;
    u_temp2=zeros(1,n);    
    for j=1:n
       u_temp2(j)= u0(j+2)-1.0*(u1(j+2)-u1(j));
    end
    u0=zeros(1,n);
    u0=u1;
    u1=u_temp2;
end
u_temp=u1;
figure(1);
axis([15 25 -0.4 1.2]);
set(gca,'XTick',[15:1:25]);   
set(gca,'yTick',[-0.4:0.2:1.2]); 
hold on;
k=15:0.05:(25);
k1=15:0.0005:25;
z=f17(k1);

fp1=plot(k,u_temp);
fp1.LineStyle='-';
fp1.Color='r';
fp1.Marker='.';
grid on;
hold on;
fp0=plot(k1,z);
fp0.Color = 'b';

string='Leapfrog-mu=1.0.png';
title(string);
saveas(1,string);
